package com.woniuxy.feign;

import com.woniuxy.entity.Coupon;
import com.woniuxy.entity.UserCoupon;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author hq
 * @Date 2025/7/14$ 15:30$
 * @Description TODO
 * @Params $
 * @Return $
 **/
@FeignClient(name = "campus-user")
public interface AllUserApi {
    /**
     * 根据优惠卷id查询优惠卷
     * @param couponId
     * @return
     */
    @GetMapping("/user/coupon/{couponId}")
    public Coupon getCouponById(@PathVariable("couponId") Integer couponId);
    @PostMapping("/user/lockCoupon/{id}")
    public Integer lockCoupon(Integer id);
}
